import logging

logger = logging.getLogger('x90-analyze')
logger.setLevel(logging.DEBUG)

# File Handler
hdlr = logging.FileHandler('logs/run.log')
formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s')
hdlr.setFormatter(formatter)
logger.addHandler(hdlr) 
hdlr.setLevel(logging.DEBUG)

# Stream handler
ch = logging.StreamHandler()
formatter = logging.Formatter('[%(levelname)s] %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch) 
ch.setLevel(logging.INFO)

def printerror (msg):
	logger.error(msg)

def printwarning (msg):
	logger.warning(msg)

def printinfo (msg):
	logger.info(msg)
